.class final Lcom/melesta/engine/FacebookOperations$4;
.super Ljava/lang/Object;
.source "FacebookOperations.java"

# interfaces
.implements Lcom/facebook/Request$Callback;


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lcom/melesta/engine/FacebookOperations;->facebookIsUserLikedGroup(Ljava/lang/String;Ljava/lang/String;II)V
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x8
    name = null
.end annotation


# instance fields
.field final synthetic val$callback:I

.field final synthetic val$group_id:Ljava/lang/String;

.field final synthetic val$me:Lcom/melesta/engine/EngineActivity;

.field final synthetic val$user_data:I

.field final synthetic val$user_id:Ljava/lang/String;


# direct methods
.method constructor <init>(Ljava/lang/String;Lcom/melesta/engine/EngineActivity;Ljava/lang/String;II)V
    .locals 0
    .parameter
    .parameter
    .parameter
    .parameter
    .parameter

    .prologue
    .line 285
    iput-object p1, p0, Lcom/melesta/engine/FacebookOperations$4;->val$group_id:Ljava/lang/String;

    iput-object p2, p0, Lcom/melesta/engine/FacebookOperations$4;->val$me:Lcom/melesta/engine/EngineActivity;

    iput-object p3, p0, Lcom/melesta/engine/FacebookOperations$4;->val$user_id:Ljava/lang/String;

    iput p4, p0, Lcom/melesta/engine/FacebookOperations$4;->val$user_data:I

    iput p5, p0, Lcom/melesta/engine/FacebookOperations$4;->val$callback:I

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public onCompleted(Lcom/facebook/Response;)V
    .locals 11
    .parameter "response"

    .prologue
    .line 290
    :try_start_0
    invoke-virtual {p1}, Lcom/facebook/Response;->getError()Lcom/facebook/FacebookRequestError;

    move-result-object v2

    .line 291
    .local v2, facebookError:Lcom/facebook/FacebookRequestError;
    if-eqz v2, :cond_3

    const/4 v6, 0x1

    .line 292
    .local v6, isErrorState:Z
    :goto_0
    if-nez v6, :cond_1

    .line 293
    const/4 v6, 0x1

    .line 294
    invoke-virtual {p1}, Lcom/facebook/Response;->getGraphObject()Lcom/facebook/model/GraphObject;

    move-result-object v3

    .line 295
    .local v3, graphObject:Lcom/facebook/model/GraphObject;
    if-eqz v3, :cond_1

    .line 296
    const-string v9, "data"

    invoke-interface {v3, v9}, Lcom/facebook/model/GraphObject;->getProperty(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lorg/json/JSONArray;

    .line 297
    .local v0, data:Lorg/json/JSONArray;
    invoke-virtual {v0}, Lorg/json/JSONArray;->length()I

    move-result v7

    .line 299
    .local v7, len:I
    add-int/lit8 v4, v7, -0x1

    .local v4, i:I
    :goto_1
    if-ltz v4, :cond_0

    .line 300
    invoke-virtual {v0, v4}, Lorg/json/JSONArray;->getJSONObject(I)Lorg/json/JSONObject;

    move-result-object v8

    .line 302
    .local v8, obj:Lorg/json/JSONObject;
    const-string v9, "id"

    invoke-virtual {v8, v9}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v5

    .line 303
    .local v5, id:Ljava/lang/String;
    iget-object v9, p0, Lcom/melesta/engine/FacebookOperations$4;->val$group_id:Ljava/lang/String;

    invoke-virtual {v9, v5}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v9

    if-eqz v9, :cond_4

    .line 304
    const/4 v6, 0x0

    .line 309
    .end local v5           #id:Ljava/lang/String;
    .end local v8           #obj:Lorg/json/JSONObject;
    :cond_0
    if-nez v6, :cond_1

    .line 310
    iget-object v9, p0, Lcom/melesta/engine/FacebookOperations$4;->val$me:Lcom/melesta/engine/EngineActivity;

    new-instance v10, Lcom/melesta/engine/FacebookOperations$4$1;

    invoke-direct {v10, p0, v7}, Lcom/melesta/engine/FacebookOperations$4$1;-><init>(Lcom/melesta/engine/FacebookOperations$4;I)V

    invoke-virtual {v9, v10}, Lcom/melesta/engine/EngineActivity;->runOnGLThread(Ljava/lang/Runnable;)V

    .line 321
    .end local v0           #data:Lorg/json/JSONArray;
    .end local v3           #graphObject:Lcom/facebook/model/GraphObject;
    .end local v4           #i:I
    .end local v7           #len:I
    :cond_1
    if-eqz v6, :cond_2

    .line 322
    iget-object v9, p0, Lcom/melesta/engine/FacebookOperations$4;->val$me:Lcom/melesta/engine/EngineActivity;

    new-instance v10, Lcom/melesta/engine/FacebookOperations$4$2;

    invoke-direct {v10, p0}, Lcom/melesta/engine/FacebookOperations$4$2;-><init>(Lcom/melesta/engine/FacebookOperations$4;)V

    invoke-virtual {v9, v10}, Lcom/melesta/engine/EngineActivity;->runOnGLThread(Ljava/lang/Runnable;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 339
    .end local v2           #facebookError:Lcom/facebook/FacebookRequestError;
    .end local v6           #isErrorState:Z
    :cond_2
    :goto_2
    return-void

    .line 291
    .restart local v2       #facebookError:Lcom/facebook/FacebookRequestError;
    :cond_3
    const/4 v6, 0x0

    goto :goto_0

    .line 299
    .restart local v0       #data:Lorg/json/JSONArray;
    .restart local v3       #graphObject:Lcom/facebook/model/GraphObject;
    .restart local v4       #i:I
    .restart local v5       #id:Ljava/lang/String;
    .restart local v6       #isErrorState:Z
    .restart local v7       #len:I
    .restart local v8       #obj:Lorg/json/JSONObject;
    :cond_4
    add-int/lit8 v4, v4, -0x1

    goto :goto_1

    .line 330
    .end local v0           #data:Lorg/json/JSONArray;
    .end local v2           #facebookError:Lcom/facebook/FacebookRequestError;
    .end local v3           #graphObject:Lcom/facebook/model/GraphObject;
    .end local v4           #i:I
    .end local v5           #id:Ljava/lang/String;
    .end local v6           #isErrorState:Z
    .end local v7           #len:I
    .end local v8           #obj:Lorg/json/JSONObject;
    :catch_0
    move-exception v1

    .line 331
    .local v1, e:Ljava/lang/Exception;
    iget-object v9, p0, Lcom/melesta/engine/FacebookOperations$4;->val$me:Lcom/melesta/engine/EngineActivity;

    new-instance v10, Lcom/melesta/engine/FacebookOperations$4$3;

    invoke-direct {v10, p0}, Lcom/melesta/engine/FacebookOperations$4$3;-><init>(Lcom/melesta/engine/FacebookOperations$4;)V

    invoke-virtual {v9, v10}, Lcom/melesta/engine/EngineActivity;->runOnGLThread(Ljava/lang/Runnable;)V

    goto :goto_2
.end method
